package com.tedu.bill.demo4;

import java.io.*;

/**
 * Author：毕龙
 * Date: 2024/5/28 9:24
 */
public class TestFile7 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
      //创建字节流对象
        FileInputStream fis = new FileInputStream("day14/src/object.txt");
        //创建对象输入流
        ObjectInputStream ois = new ObjectInputStream(fis);

        //获取对象
        Object o = ois.readObject();

        User user = (User) o;

        System.out.println(user);

        //关闭流
        ois.close();
        fis.close();


    }
}
